<template>
     <van-skeleton v-if="status" title :row="3" />
    <div v-else>
        <van-nav-bar title="商品详情" left-text="返回" left-arrow @click-left="() => { $router.back('/home/cla') }" />
        <swipe></swipe>
        <div>
            <p style="color: #999;">白色3000mAh 移动电源充电宝</p>
            <span style="color: red; font-size: 20px;">￥99</span><span style="color: #999;">￥109</span>
            <span><button
                    style="background-color: blue; color: wheat; border-radius: 10px;float: right;">选规格</button></span>
        </div>
        <van-tabs v-model:active="active" style="margin-left: 20px;">
            <van-tab title="商品详情"></van-tab>
            <van-tab title="规格参数"></van-tab>
            <van-tab title="销量数据"></van-tab>
            <van-tab title="采购说明"></van-tab>
        </van-tabs>
        <swipe></swipe>
        <div v-html="detail.goods_introduce"></div>
     
<van-submit-bar :price="3050" button-text="去结算" @submit="onSubmit" />
    </div>
    
</template>

<script setup>
import { ref } from 'vue';
import { detailApi } from '@/api/api'
import { useRoute } from 'vue-router';
import { useRouter } from 'vue-router';
import swipe from '@/components/swipe.vue';
let status=ref(true)
setTimeout(()=>{
    status.value=false
},2000)
let route = useRoute()
let router = useRouter()
let detail = ref([])
detailApi(route.params.goods_id).then(res => {
    console.log('商品详情', res);
    detail.value = res.data.message
})
let onSubmit = () => {

    router.push('/dd')
}
</script>

<style lang="scss" scoped></style>